$(window).ready(function(){
});

document.onkeydown = function (e) {
	var theEvent = window.event || e;
	var code = theEvent.keyCode || theEvent.which;
	if (code == 13) {
		$("#login").click();
	}
};

function to_register(){
	window.location = '/cloud_ifw/pages/home/register.jsp';
}

function login(){
	var email = $('.email').val();
	var password = $('.password').val();
	var code = $('.vc').val();
	if(!$('form').validate()){
		return;
	}
	else{
		$('form').submit();
	}
}

function register(){
	location.href = "/cloud_ifw/pages/home/register.jsp";
}

function forgetpwd(){
	location.href = "/cloud_ifw/pages/home/forgetpwd.jsp";
}

function changeVc(){
	$('.vcimg').attr('src','/cloud_ifw/common/verify_graphCode.action?_dc' + Math.random());
}